home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12564 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  33 lines

  1. Newsgroups: comp.lang.c++
  2. Path: artemis.sto.fdata.se!news
  3. From: Mikael Andersson <dala@ludd.luth.se>
  4. Subject: File I/O problems in DLL
  5. Sender: news@artemis.sto.fdata.se (UseNet NetNews)
  6. Message-ID: <3150365E.2310@ludd.luth.se>
  7. Date: Wed, 20 Mar 1996 16:46:22 GMT
  8. Content-Transfer-Encoding: 7bit
  9. Content-Type: text/plain; charset=us-ascii
  10. Mime-Version: 1.0
  11. X-Mailer: Mozilla 2.01 (Win95; I)
  12. Organization: WM-data F÷rsvarsdata AB, Sweden
  13.  
  14. I'm having trouble with file I/O in a DLL I've made with Borland C++ 
  15. 4.0x which a FoxPro program is using. 
  16.  
  17. First I made a testprogram in C++ and everything went ok, but the DLL 
  18. just stopped working when called by the FoxPro program. After much 
  19. trouble I heard that you must use SDK file I/O in the DLL, I used 
  20. ifstream and TFile, so I tested with OpenFile and _lread and so on and 
  21. it worked again. So what's this all about? Can't you use TFile and 
  22. ifstream, and if so why?
  23.  
  24. The problems I had when using ifstream and TFile was that a file FoxPro 
  25. created when opened in the DLL was empty (or the ifstream just couldn't 
  26. get any thing from it). Is it some kind of buffering problem, or 
  27. what? Both TFile and ifstream had problems with closing the files it 
  28. opened/created.
  29.  
  30. Grateful for all help I can get.
  31.  
  32. Micke Andersson, dala@ludd.luth.se
  33.